import SynchronizationLoginNork from '@/utils/SynchronizationLoginWork'
import Synchronization from "@/utils/Synchronization"


// 耗品出库表格数据
export interface TableDataT{
    slipNo: string,
    slipDate: string,
    slipReason: string,
    deptName: string,
    lotNo: null,
    mtlNo: string,
    mtlColor: string,
    mtlName: string,
    mtlSpec: null,
    mtlUnit: string,
    qty: Number,
    remark: null,
    sysUser: null
}

export interface ConsumablesOutData{
    total:number,
    outDtos:TableDataT[]
}

export interface ConsumableParameterInterface {
    pageNum:Number,
    pageSize:Number,
    slipNo:string,
    slipReason:string,
    slipStartDate:string,
    slipEndDate:string,
    deptName:string,
    mtlNo:string,
    mtlName:string,
    lotNo:string,
    typeNo:string
}

// Find下拉框数据
interface ConsumableDropDownBox{
    reason:[],
    dept:[],
    type:ConsumableDropDownBoxType[],
}

interface ConsumableDropDownBoxType{
    typeNo: string,
    typeName: string
}


export const ObtainConsumableDeliveryData = (parms:ConsumableParameterInterface) => {
    return Synchronization.put<any,ConsumablesOutData>('/pcFactorQuery/queryPartBfOut',parms)
}

export const FindTable = () => {
    return  Synchronization.get<any,ConsumableDropDownBox>('/pcFactorQuery/queryPartBfOutBack')
}
         